import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;

public class Test02 {
    //public static final boolean FLAG = false;
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String string = scanner.nextLine();
        char[] arr = string.toCharArray();
        HashMap<Character , Integer> hashmap = new HashMap<>();
        for (int i = 0; i < arr.length; i++) {
            hashmap.put(arr[i],hashmap.getOrDefault(arr[i] , 0) + 1);
        }
        HashSet<Character> set = new HashSet<>();
        for (int i = 0; i < arr.length; i++) {
            if(hashmap.get(arr[i]) > 1){
                //a, 1; a, 4; a, 5; a, 10; b, 2; b, 11; 1, 8; 1, 12; 2, 9; 2, 13;

                for (int j = i; j < arr.length; j++) {
                    if(arr[j] == arr[i] && !set.contains(arr[j])){
                        System.out.print(arr[j]+", " + (j+ 1)+"; ");

                    }
                }
                set.add(arr[i]);

            }
        }
        System.out.println();
    }
}
